﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using TransCode.Logic;
using TransCode.Player.EntityViews;

namespace TransCode.Player.ImagePage
{
    /// <summary>
    /// Interaction logic for ImageMainPage.xaml
    /// </summary>
    public partial class ImageMainPage : Page
    {
        public ImageMainPage()
        {
            InitializeComponent();

            this.Loaded += new RoutedEventHandler(ImageMainPage_Loaded);
        }

        VideoLogic videoLogic = new VideoLogic();

        void ImageMainPage_Loaded(object sender, RoutedEventArgs e)
        {
            targetImageControl1.VideoSource = videoLogic.VideoList();
        }

        public void Query(DateTime begin, DateTime end)
        {
            targetImageControl1.VideoSource = videoLogic.Querys(begin, end);
        }

        public void ShowImageBox(UIElement ui)
        {
            layout.Children.Add(ui);
        }
    }
}
